/*
* Copyright (C) 2017-2021
* All rights reserved, Designed By
* Copyright authorization contact 18814114118
*/
package com.shop.cereshop.commons.domain.product;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 商品均价统计表
 * </p>
 *
 * @since 2025-07-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@TableName("product_average_price")
@ApiModel(value = "ProductAveragePrice", description = "商品均价统计表")
@AllArgsConstructor
public class ProductAveragePrice {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID")
    @NotNull(message = "主键ID不能为空")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 商品分类ID
     */
    @ApiModelProperty(value = "商品分类ID")
    @NotNull(message = "商品分类ID不能为空")
    @TableField("classify_id")
    private Long classifyId;


    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称")
    @NotEmpty(message = "分类名称不能为空")
    @Length(max = 50, message = "分类名称长度不能超过50")
    @TableField(value = "classify_name", condition = LIKE)
    private String classifyName;


    /**
     * 分类级别
     */
    @ApiModelProperty(value = "分类级别")
    @NotNull(message = "分类级别不能为空")
    @TableField("classify_level")
    private Integer classifyLevel;


    /**
     * 商品数量
     */
    @ApiModelProperty(value = "商品数量")
    @NotNull(message = "商品数量不能为空")
    @TableField("product_count")
    private Integer productCount;


    /**
     * 价格总和
     */
    @ApiModelProperty(value = "价格总和")
    @NotNull(message = "价格总和不能为空")
    @TableField("total_price")
    private BigDecimal totalPrice;


    /**
     * 平均价格
     */
    @ApiModelProperty(value = "平均价格")
    @NotNull(message = "平均价格不能为空")
    @TableField("average_price")
    private BigDecimal averagePrice;


    /**
     * 最低价格
     */
    @ApiModelProperty(value = "最低价格")
    @TableField("min_price")
    private BigDecimal minPrice;


    /**
     * 最高价格
     */
    @ApiModelProperty(value = "最高价格")
    @TableField("max_price")
    private BigDecimal maxPrice;


    /**
     * 价格区间
     */
    @ApiModelProperty(value = "价格区间")
    @Length(max = 50, message = "价格区间长度不能超过50")
    @TableField(value = "price_range", condition = LIKE)
    private String priceRange;


    /**
     * 统计日期
     */
    @ApiModelProperty(value = "统计日期")
    @NotNull(message = "统计日期不能为空")
    @TableField("statistics_date")
    private LocalDate statisticsDate;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @NotNull(message = "创建时间不能为空")
    @TableField("create_time")
    private LocalDateTime createTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @NotNull(message = "更新时间不能为空")
    @TableField("update_time")
    private LocalDateTime updateTime;




}
